package com.xunk.scene.constant;

import java.util.Arrays;
import java.util.List;

/**
 * @ProjectName: HIM
 * @Package: com.xunk.scene.constant
 * @ClassName: SceneConstant
 * @Author: luanzhiwei
 * @Description: 场景常量
 * @Date: 2021/5/7 10:04
 * @Version: 1.0
 */
public class SceneConstant {

    /**
     * 定时执行
     */
    public static final String taskSchedule = "taskSchedule";

    /**
     * 休息日
     */
    public static final List<String> noWorkDates = Arrays.asList("20210101", "20210102", "20210103", "20210109", "20210110", "20210116", "20210117", "20210123", "20210124", "20210130", "20210131", "20210206", "20210211", "20210212", "20210213", "20210214", "20210215", "20210216", "20210217", "20210220", "20210221", "20210227", "20210228", "20210306", "20210307", "20210313", "20210314", "20210320", "20210321", "20210327", "20210328", "20210403", "20210404", "20210405", "20210410", "20210411", "20210417", "20210418", "20210424", "20210425", "20210501", "20210502", "20210503", "20210509", "20210515", "20210516", "20210522", "20210523", "20210529", "20210530", "20210605", "20210606", "20210612", "20210613", "20210614", "20210619", "20210620", "20210626", "20210627", "20210703", "20210704", "20210710", "20210711", "20210717", "20210718", "20210724", "20210725", "20210731", "20210801", "20210807", "20210808", "20210814", "20210815", "20210821", "20210822", "20210828", "20210829", "20210904", "20210905", "20210911", "20210912", "20210918", "20210919", "20210921", "20210925", "20210926", "20211001", "20211002", "20211003", "20211004", "20211005", "20211006", "20211007", "20211016", "20211017", "20211023", "20211024", "20211030", "20211031", "20211106", "20211107", "20211113", "20211114", "20211120", "20211121", "20211127", "20211128", "20211204", "20211205", "20211211", "20211212", "20211218", "20211219", "20211225", "20211226");

    /**
     * 作业类型:
     * DAY  -> 每日
     * MONTH  -> 每月
     * WEEK  -> 每周
     * DATE  -> 指定日期
     * WORKDATE  -> 工作日 （周一-周五）
     * WEEKEND -> 周六-周日
     */
    public static final String day = "DAY";
    public static final String month = "MONTH";
    public static final String week = "WEEK";
    public static final String date = "DATE";
    public static final String workDate = "WORKDATE";
    public static final String weekend = "WEEKEND";

    /**
     * redis前缀
     */
    public static final String SCENE_REDIS_PREFIX = "SCENE:";
    /**
     * 操作设备条件redis锁key
     */
    public static final String EQUIPMENT_CONDITION_OPERATION = SCENE_REDIS_PREFIX + "EQUIPMENT_CONDITION_OPERATION";
    /**
     * 设备条件redis集合key
     */
    public static final String EQUIPMENT_CONDITION_SET = SCENE_REDIS_PREFIX + "EQUIPMENT_CONDITION_SET";
    /**
     * 字符串0
     */
    public static final String STRING_ZERO = "0";
    /**
     * 字符串1
     */
    public static final String STRING_ONE = "1";
    /**
     * 字符串2
     */
    public static final String STRING_TWO = "2";
    /**
     * 逻辑删除
     */
    public static final String DEL_Y = STRING_ONE;
    /**
     * 未逻辑删除
     */
    public static final String DEL_N = STRING_ZERO;
    /**
     * 场景生效
     */
    public static final String SCENE_ACTIVE_Y = STRING_ONE;
    /**
     * 场景未生效
     */
    public static final String SCENE_ACTIVE_N = STRING_ZERO;
    /**
     * 缓存设备id和属性之间的分隔符
     */
    public static final String SEPARATOR_EQUIPMENT = "<-->";

    /**
     * 场景模块密钥 key
     */
    public static final String SCENE_KEY = "scene:sceneKey";

    /**
     * 定时执行场景锁，设置一定的执行周期
     */
    public static final String SCENE_TIMER_LOCK = "scene:timer:lock";

    /**
     * 根据userid缓存homeid集合的key
     */
    public static final String HOME_ID_LIST = SCENE_REDIS_PREFIX + "SCENE_HOME_ID_LIST:";
    /**
     * 根据userid未查到homeid短时间内累计次数的key
     */
    public static final String MISS_HOME_ID_LIST_COUNT = SCENE_REDIS_PREFIX + "MISS_HOME_ID_LIST_COUNT:";
    /**
     * 全部APP头像列表接口redis key
     */
    public static final String APP_ICON_LIST = SCENE_REDIS_PREFIX + "APP_ICON_LIST";
    /**
     * 全部PAD头像列表接口redis key
     */
    public static final String PAD_ICON_LIST = SCENE_REDIS_PREFIX + "PAD_ICON_LIST";
    /**
     * 边缘场景id自增 redis锁
     */
    public static final String EDGE_SCENE_ID_GEN = SCENE_REDIS_PREFIX + "EDGE_SCENE_ID_GEN:";
}
